package com.freewater.springboot.demo.ioc.staticbeanmethod;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {

    // 为static方法，不会被cglib动态代理
    @Bean
    public static BeanA beanB1() {
        return new BeanA();
    }

    // 为实例方法，会被cglib动态代理
    @Bean
    public BeanA beanB2() {
        return new BeanA();
    }
}
